.class Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;
.super Ljava/lang/Object;
.source "MediaControlPanelViewMode.java"

# interfaces
.implements Landroid/widget/SeekBar$OnSeekBarChangeListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/view/MediaControlPanelViewMode;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;


# direct methods
.method constructor <init>(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)V
    .locals 0
    .parameter

    .prologue
    .line 331
    iput-object p1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onProgressChanged(Landroid/widget/SeekBar;IZ)V
    .locals 8
    .parameter "seekBar"
    .parameter "progress"
    .parameter "fromTouch"

    .prologue
    .line 296
    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    iget v3, v3, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mState:I

    if-nez v3, :cond_0

    invoke-static {}, Lcom/htc/android/footprints/utils/StorageUtil;->hasExternalStorage()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 297
    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    iget-object v3, v3, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayHandler:Landroid/os/Handler;

    new-instance v4, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3$1;

    invoke-direct {v4, p0}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3$1;-><init>(Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;)V

    invoke-virtual {v3, v4}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 305
    :cond_0
    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayer:Landroid/media/MediaPlayer;
    invoke-static {v3}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$700(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Landroid/media/MediaPlayer;

    move-result-object v3

    if-nez v3, :cond_2

    .line 321
    :cond_1
    :goto_0
    return-void

    .line 307
    :cond_2
    if-eqz p3, :cond_1

    .line 308
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v1

    .line 310
    .local v1, now:J
    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    iget-object v4, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    iget-wide v4, v4, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mVoiceLength:J

    int-to-long v6, p2

    mul-long/2addr v4, v6

    const-wide/16 v6, 0x3e8

    div-long/2addr v4, v6

    #setter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPosOverride:J
    invoke-static {v3, v4, v5}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$602(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;J)J

    .line 311
    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mLastSeekEventTime:J
    invoke-static {v3}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$800(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)J

    move-result-wide v3

    sub-long v3, v1, v3

    const-wide/16 v5, 0xfa

    cmp-long v3, v3, v5

    if-lez v3, :cond_1

    .line 312
    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #setter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mLastSeekEventTime:J
    invoke-static {v3, v1, v2}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$802(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;J)J

    .line 315
    :try_start_0
    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayer:Landroid/media/MediaPlayer;
    invoke-static {v3}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$700(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Landroid/media/MediaPlayer;

    move-result-object v3

    iget-object v4, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPosOverride:J
    invoke-static {v4}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$600(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)J

    move-result-wide v4

    long-to-int v4, v4

    invoke-virtual {v3, v4}, Landroid/media/MediaPlayer;->seekTo(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 316
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 317
    .local v0, ex:Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public onStartTrackingTouch(Landroid/widget/SeekBar;)V
    .locals 4
    .parameter "seekBar"

    .prologue
    .line 324
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayer:Landroid/media/MediaPlayer;
    invoke-static {v1}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$700(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Landroid/media/MediaPlayer;

    move-result-object v1

    if-nez v1, :cond_0

    .line 329
    :goto_0
    return-void

    .line 326
    :cond_0
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mContext:Landroid/content/Context;
    invoke-static {v1}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$900(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Landroid/content/Context;

    move-result-object v1

    const-string v2, "vibrator"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/os/Vibrator;

    .line 327
    .local v0, vibrator:Landroid/os/Vibrator;
    const-wide/16 v1, 0x1e

    invoke-virtual {v0, v1, v2}, Landroid/os/Vibrator;->vibrate(J)V

    .line 328
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    const-wide/16 v2, 0x0

    #setter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mLastSeekEventTime:J
    invoke-static {v1, v2, v3}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$802(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;J)J

    goto :goto_0
.end method

.method public onStopTrackingTouch(Landroid/widget/SeekBar;)V
    .locals 5
    .parameter "seekBar"

    .prologue
    .line 332
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    iget v1, v1, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mState:I

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;
    invoke-static {v1}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$1000(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-static {}, Lcom/htc/android/footprints/utils/StorageUtil;->hasExternalStorage()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 333
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    iget-object v1, v1, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayHandler:Landroid/os/Handler;

    new-instance v2, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3$2;

    invoke-direct {v2, p0, p1}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3$2;-><init>(Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;Landroid/widget/SeekBar;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 341
    :cond_0
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayer:Landroid/media/MediaPlayer;
    invoke-static {v1}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$700(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Landroid/media/MediaPlayer;

    move-result-object v1

    if-nez v1, :cond_1

    .line 351
    :goto_0
    return-void

    .line 344
    :cond_1
    :try_start_0
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayer:Landroid/media/MediaPlayer;
    invoke-static {v1}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$700(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Landroid/media/MediaPlayer;

    move-result-object v1

    invoke-virtual {v1}, Landroid/media/MediaPlayer;->getCurrentPosition()I

    move-result v1

    int-to-long v1, v1

    iget-object v3, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPosOverride:J
    invoke-static {v3}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$600(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)J

    move-result-wide v3

    cmp-long v1, v1, v3

    if-eqz v1, :cond_2

    .line 345
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPlayer:Landroid/media/MediaPlayer;
    invoke-static {v1}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$700(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)Landroid/media/MediaPlayer;

    move-result-object v1

    iget-object v2, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    #getter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPosOverride:J
    invoke-static {v2}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$600(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;)J

    move-result-wide v2

    long-to-int v2, v2

    invoke-virtual {v1, v2}, Landroid/media/MediaPlayer;->seekTo(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 350
    :cond_2
    :goto_1
    iget-object v1, p0, Lcom/htc/android/footprints/view/MediaControlPanelViewMode$3;->this$0:Lcom/htc/android/footprints/view/MediaControlPanelViewMode;

    const-wide/16 v2, -0x1

    #setter for: Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->mPosOverride:J
    invoke-static {v1, v2, v3}, Lcom/htc/android/footprints/view/MediaControlPanelViewMode;->access$602(Lcom/htc/android/footprints/view/MediaControlPanelViewMode;J)J

    goto :goto_0

    .line 346
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 347
    .local v0, ex:Ljava/lang/Exception;
    const-string v1, "MediaControlPanelViewMode"

    const-string v2, "seekbar tracking error"

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 348
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1
.end method
